<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/5/26
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Date date = new Date();
    SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
    String str = df.format(date);
    String str2 = "今天是个好日子！";
    String str3 = "1900-2020之间的闰年：";
    out.print("<h1>");
    out.print(str);
    out.print("<h1>");

    out.print("<h2>");
    out.print(str2);
    out.print("<h2>");

    out.print("<h3>");
    out.print(str3);
    out.print("<h3>");
    for (int year = 1900; year <= 2020; year++) {
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
            out.print("<h4>" + year + "</h4>");
        }
    }
%>
</body>
</html>
